翻訳と辞書
Words near each other
・ Laïd Madouni
・ Laïka Fatien
・ Laïko
・ Laïla Abid
・ Laïla Marrakchi
・ Laïs (band)
・ Laïs (physician)
・ Laïsa Lerus
・ Laïta
・ Laúd
・ Laüs
・ Lazy Eye (Silversun Pickups song)
・ Lazy Farmer (album)
・ Lazy Henry
・ Lazy Highways
Lazy inheritance
・ Lazy initialization
・ Lazy jack
・ Lazy Jay Ranch
・ Lazy Jones
・ Lazy Kate
・ Lazy Lake, Florida
・ Lazy Lamhe
・ Lazy learning
・ Lazy Lester
・ Lazy Line Painter Jane
・ Lazy Line Painter Jane (boxset)
・ Lazy linear hybrid automaton
・ Lazy Lion
・ Lazy loading


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Lazy inheritance : ウィキペディア英語版
Lazy inheritance

Lazy inheritance is a design pattern used in JavaScript computer programming.
It designates a postponed linking of an object with its prototype (class) until it is needed. If used properly, such approach may increase efficiency, simplicity and flexibility of OOP-based code written using JavaScript.
Since lazy inheritance called only once at the moment of first object instance creation, it seems logical to combine process of class prototype creation with resolving necessary dependencies of that class.
The instances of objects in lazy inheritance are created in "mixed" mode — on first invocation, a factory is used to modify class prototype which is later is used for subsequent object instances creation. In other words, the process of prototype construction also allows loading scripts (if ones were not loaded before) which particular class depends on.
Such approach to inheritance support has the following benefits:
*Lazy inheritance has the same benefits as classical JavaScript prototype features;
* It is not necessary to maintain proper order of script files declaration;
* In most cases, HTML page which contains JavaScript is loaded faster since there are no objects created during page initialization and since some scripts could be loaded only at the moment in which they are actually necessary (they are necessary if the caller code during its execution really creates instances of corresponding classes);
* Dependencies are declared in more explicit way and class depends only on concrete scripts; Moreover, it's not necessary to artificially group particular scripts into modules and define dependencies between such modules;
* If lazy mode of scripts loading is used, only necessary scripts (which are actually required for application functionality) will be loaded. If, for example, some HTML page may operate in different modes, like "read-write" and "read-only", for every mode required scripts will be loaded and this will be performed automatically without manual script loading optimization.
== See also ==

* Lazy loading
* Lazy initialization

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Lazy inheritance」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.